<?php
 
session_start();

include_once("library/mycontroller.php");
include_once("library/mymodel.php");
include_once("library/message.php");

include_once("Controller/user.php");
include_once("Controller/tinhthanh.php");
include_once("Controller/quanhuyen.php");
include_once("Controller/phuongxa.php");
include_once("Controller/thonxom.php");
include_once("Controller/treeview.php");

if(isset($_GET['control']))
{
    $control = $_GET['control'];
    switch($control)
    {
        case "tinhthanh":
            $controller = new TinhThanh();
            $controller->invoke();
            break;
        case "quanhuyen":
            $controller = new QuanHuyen();
            $controller->invoke();
            break;
        case "phuongxa":
            $controller = new PhuongXa();
            $controller->invoke();
            break;
        case "thonxom":
            $controller = new ThonXom();
            $controller->invoke();
            break;
        case "user":
            $controller = new User();
            $controller->invoke();
            break;
        case "treeview":
            $controller = new TreeView();
            $controller->invoke();
            break;
        default:
            $controller = new User();
            $controller->invoke();
            break;
    }
}
else
{
    $controller = new User();
    $controller->invoke();
}


?>